package com.hzit.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/*
* 配置分页助手
* @SpringBootConfiguration 声明这个类是配置类
* @EnableTransactionManagement：启动事务
* */
@SpringBootConfiguration
@EnableTransactionManagement
public class MybatisPlusPage {
    /* <bean id class="PaginationInterceptor" > */
    /*   把 PaginationInterceptor对象交给容器去管理*/
    @Bean
    public PaginationInterceptor getPaginationInterceptor(){
        return new PaginationInterceptor();
    }


}
